/******************************************************************************

 ******************************************************************************
  File Name	:common.h
  Version		:001
  Author		:liangH
  Description	:define common class for system
  History		:20130619 new
  Modification	: 

******************************************************************************/

#ifndef __COMMON_H__
#define __COMMON_H__

#include "config.h"
#include "network_manage.h"
#include "parameter.h"
#include "medium_manage.h"
#include "log.h"
#include "indicator.h"
#include "video.h"
#include "osd.h"
#include "recorder.h"
#include "ftp.h"
#include "ptz.h"
#include "queue.h"
#include "bus_core.h"
#include "bus_net.h"
class CommonClass
{
	public:
		Network_manage *net_manage;
		Parameter_config *para_config;
		Medium_manage *med_manage;
		Log *log;
		Video *video;
		Indicator *indicator;
		Osd *osd;
		Recorder *recorder;
		FTP *ftp;
		PTZ *ptz;
		char local_mac_address[7];

	public:
		CommonClass();
		~CommonClass();
	public:
		void get_current_gmt_time(struct tm *current_time, time_t *second_time);/*get current GMT time*/
		void get_current_local_time(struct tm *current_time, time_t *second_time);/*get current local time*/
		void get_macaddr(char *macaddr);/*get MAC address*/
		void sleep_function(unsigned long mseconds);/*sleep*/
		void copy_mac_address(char *temp_mac_address);

	private:	
	/*inside process function*/
		SOCKET sock;/*socket ID of sleep_function*/
	/*inside process function end*/
 };

#endif

